.PHONY: all clean

all: final.pdf

final.pdf: solution.pdf final.tex
	xelatex final.tex

solution.pdf: solution.gpl
	gnuplot -e "set style data lines; set term pdf; set output 'solution.pdf'; splot 'solution.gpl'; exit"

clean:
	rm -f final.pdf solution.pdf *.log *.aux *.gpl
